<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <%@include file="/static/common/common.jsp" %>
    <script src="/static/js/employee/employee.js"></script>
    <style>
        .datagrid-cell-check input {
            margin-top: 2px;
        }

        .dialog-form {
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            padding: 14px 20px;
            justify-content: space-around;
        }

        .dialog-form p {
            display: flex;
            padding-top: 3px;
            padding-bottom: 3px;
            align-items: center;
        }

        .dialog-form .left {
            width: 90px;
        }

    </style>
</head>
<body>

<table id="emp_datagrid"></table>

<div id="emp_toolbar">
    <shiro:hasPermission name="employee:saveOrUpdate">
        <a class="easyui-linkbutton" iconCls="icon-add2 iconfont" plain="true" data-cmd="add">新增</a>
        <a class="easyui-linkbutton" iconCls="icon-bianji iconfont" plain="true" data-cmd="edit">编辑</a>
    </shiro:hasPermission>
    <a id="state_btn" class="easyui-linkbutton" iconCls="iconfont icon-yijiaozhuchiren" plain="true" data-cmd="changeState">离职</a>
    <input id="keyword" class="easyui-textbox" prompt="请输入用户名或电话">
    入职日期：<input id="minHireDate" class="easyui-datebox" prompt=""> ~
    <input id="maxHireDate" class="easyui-datebox" prompt="">
    部门：<input id="deptId" class="easyui-combobox"
              data-options="url:'/department/selectAll.do',valueField:'id',textField:'name'">
    <a class="easyui-linkbutton" iconCls="iconfont icon-sousuo" plain="true" data-cmd="query">搜索</a>
    <%--<a class="easyui-linkbutton" iconCls="iconfont icon-jujue" plain="true" data-cmd="reset">重置密码</a>--%>
    <%--<a class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="window.open('/employee/exportXls.do')">导出</a>--%>
    <%--<form id="uploadForm" enctype="multipart/form-data">--%>
    <%--<input type="file" name="file" id="uploadFile">--%>
    <%--</form>--%>

    <%--<a class="easyui-linkbutton" iconCls="icon-upload" plain="true" data-cmd="upload">上传</a>--%>
    <%--<form action="/employee/uploadXls.do" method="post" enctype="multipart/form-data">--%>
        <%--<input type="file" name="file">--%>
        <%--<input type="submit">--%>
    <%--</form>--%>
</div>
<div id="form_btns">
    <a class="easyui-linkbutton" iconCls="iconfont icon-dui" plain="true" data-cmd="save">保存</a>
    <a class="easyui-linkbutton" iconCls="iconfont icon-jujue" plain="true" data-cmd="cancel">取消</a>
</div>

<%--弹出框--%>
<div id="emp_dialog" class="easyui-dialog">
    <form method="post" class="dialog-form" id="emp_form">
        <input type="hidden" name="id" id="empId">
        <p>
            <span class="left">用户名:</span>
            <input name="username" class="easyui-textbox" prompt="请输入姓名"
                   data-options="invalidMessage:'该用户名已存在'"
                   validType="remote['/employee/validateName.do?id=' + empId.value, 'name']">
        </p>
        <p>
            <span class="left">真实姓名:</span>
            <input name="realname" class="easyui-textbox" prompt="请输入真实姓名">
        </p>
        <p class="myPassword">
            <span class="left">密码:</span>
            <input name="password" class="easyui-passwordbox" prompt="请输入密码">
        </p>
        <p>
            <span class="left">邮箱:</span>
            <input name="email" class="easyui-textbox" prompt="请输入邮箱">
        </p>
        <p>
            <span class="left">电话:</span>
            <input name="tel" class="easyui-textbox" prompt="请输入电话">
        </p>
        <p>
            <span class="left">部门:</span>
            <input name="dept.id" class="easyui-combobox"
                   data-options="url:'/department/selectAll.do',valueField:'id',textField:'name'">
        </p>
        <p>
            <span class="left">入职时间:</span>
            <input name="hiredate" class="easyui-datebox">
        </p>
        <p>
            <span class="left">管理员:</span>
            <input name="admin" class="easyui-combobox" prompt="" width="100" value="0"
                   data-options="valueField:'value',panelHeight:'auto',
             data:[{text:'是',value:'1'},{text:'否',value:'0'}]">
        </p>
        <p>
            <span class="left">角色:</span>
            <input id="role_combobox" class="easyui-combobox" prompt="" width="100"
                   data-options="valueField:'id',panelHeight:'auto',multiple:true,textField:'name',
             url:'/role/selectAll.do'">
        </p>
    </form>
</div>


<%--<div id="emp_dialog_pas" class="easyui-dialog">--%>
<%--<form method="post" class="dialog-form" id="emp_form_pas">--%>
<%--<input type="hidden" name="id" id="empId_">--%>
<%--<p>--%>
<%--<span class="left">用户名:</span>--%>
<%--<input name="username" class="easyui-textbox" prompt="请输入姓名"--%>
<%--data-options="invalidMessage:'该用户名已存在'"--%>
<%--validType="remote['/employee/validateName.do?id=' + empId.value, 'name']">--%>
<%--</p>--%>
<%--<p class="myPassword">--%>
<%--<span class="left">密码:</span>--%>
<%--<input name="password" class="easyui-passwordbox" prompt="请输入密码">--%>
<%--</p>--%>
<%--</form>--%>
<%--</div>--%>
</body>
</html>
